fix!: deleteUser takes id, not email - #53
Merged
Merged
Conversation
Mirrors authorizerdev/authorizer#753. Email is not an identifier every account has — a phone-only signup has none — so an email-keyed delete could not reach those accounts at all, and there was no second way in. BREAKING CHANGE: DeleteUserRequest.email is replaced by DeleteUserRequest.id. Requires server 2.4.0+; the server removed the email field rather than accepting both.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Mirrors the server-side breaking change in authorizerdev/authorizer#753.
_delete_userwas keyed on email. Email is not an identifier every account has — a phone-only signup has none — so an email-keyed delete could not reach those accounts at all, and there was no second identifier accepted. Those accounts were permanent.Change
export interface DeleteUserRequest { - email: string; + id: string; }deleteUser()passes params straight through to GraphQL/REST, so the type is the whole surface — no dispatch changes needed.BREAKING
Requires server 2.4.0+. The server removed the
emailfield rather than accepting both, so an older SDK against a 2.4.0 server fails, and this SDK against a pre-2.4.0 server fails. On the wire the proto reserves field 1 rather than reusing it, so an old client fails loudly instead of having its email silently decode as an id on a delete path.Callers migrate by passing the id they already have from
getUsers/getUser.Verified
npm run buildandnpm test(10 suites, 101 tests) both pass. No test or README referenceddeleteUser, so nothing else needed updating.Version bump left out — this repo does releases in dedicated
chore: releasecommits. Worth a major given the break.